package com.scs.application.modules.wm.service;

import com.scs.application.core.service.IBaseService;
import com.scs.application.modules.wm.dto.PickDTO;
import com.scs.application.modules.wm.entity.Dist;
import com.scs.application.modules.wm.entity.WorkOrder;
import com.scs.application.modules.wm.vo.DistVO;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Service
 * </p>
 */

public interface DistService extends IBaseService<Dist> {

    /**
     * 依据 SN/RFID/UDI 进行拣货
     * @param uniqueCode
     */
    void pick(String distId ,String uniqueCode);

    /**
     * 拣货删除
     * @param pickItemIdList
     */
    void unpick(List<String> pickItemIdList);

    /**
     * 根据配送单key获取整个配送单信息
     * @param distKey
     * @return
     */
    Map getDistByKey(String distKey);
    /**
     * 根据配送单ID获取整个配送单信息
     * @param distId
     * @return
     */
    Map getDistById(String distId);

    void pdfPreview(String id, HttpServletResponse response);

    /**
     * 根据订单自动转换配送单
     * @param workOrder
     */
    Dist autoChangeDist(WorkOrder workOrder);

    /**
     * 查询配送调度板展示的信息
     * @return
     */
    Map getDistSchedule();

    /**
     * 移动端拣货
     * @param distId:配送单ID
     * @param uc：唯一码
     */
    Map mobilePick(String distId, String uc);

    /**
     * 更新收货信息
     * @param para:receiver--接收人；signature--签名图片字符串BASE64
     */
    void updateReceiver(Map para);

    /**
     * 查询本周运营配送单数量
     */
    Integer findThisWeekDistCount();

    /**
     * 查询本周收货数量
     */
    Integer findThisWeekDeliveryCount();

    List<Map> listForPDA(String busKey);

    /**
    * @Description：批量拣货
    */
    void pickBatch(List<PickDTO> pickDTOs);

    DistVO findByIdForPDA(String id);

    DistVO findBy(String key, String value);

    List<WorkOrder> convertDistToOrders(Dist dist);
}
